﻿using FastMvc.Crud.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace JQ.SAAS.DTO.SysMenus
{
    /// <summary>
    /// 新建菜单用数据
    /// </summary>
    public class SysMenusCreateDto : DtoEntity
    {
        /// <summary>
        /// Desc:菜单名称
        /// Default:
        /// Nullable:False
        /// </summary>           
        [Required]
        public string sName { get; set; }

        /// <summary>
        /// Desc:0：页面菜单 1：操作菜单
        /// Default:0
        /// Nullable:False
        /// </summary>           
        [Required]
        [EnumValue(0,1)]
        public int iType { get; set; }

        /// <summary>
        /// Desc:显示图标
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string icon { get; set; }

        /// <summary>
        /// Desc:父节点（操作菜单不可为空）
        /// Default:
        /// Nullable:True
        /// </summary>           
        [RequiredIF("iType",1)]
        public string ParentId { get; set; }

        /// <summary>
        /// Desc:对应操作权限
        /// Default:
        /// Nullable:False
        /// </summary>           
        public string sPermission { get; set; }

        /// <summary>
        /// 菜单分类 0：系统管理菜单 1：机构管理菜单 2：默认资源 3：收费资源
        /// </summary>
        [EnumValue(0, 1, 2, 3)]
        public int iClassify { get; set; }
    }
}
